package com.yhxd.modular.news.dao;

import com.yhxd.modular.news.entity.News;
import com.yhxd.modular.system.entity.Resource;
import com.yhxd.modular.system.entity.UserRole;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AllInfoDao extends JpaRepository<News, Long>, JpaSpecificationExecutor<News> {

    Page<News> findByCcidAndStatusAndPublishDateIsNotNull(Long id, Integer status, Pageable pageable);
}
